package br.ufrn.sipac.patrimonio.coletor.transmissao;

import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;

import android.os.AsyncTask;

/**
 * Thread que lida com as requisições de conexão com o webservice.
 * 
 * @author Giuliana Silva Bezerra
 * 
 */
public class TrasmissaoTask extends AsyncTask<Object, Void, Object> {

	protected Object doInBackground(Object... params) {
		Object obj = null;
		try {
			String URL = (String) params[0];
			HttpTransportSE ht = (HttpTransportSE) params[1];
			SoapSerializationEnvelope envelope = (SoapSerializationEnvelope) params[2];
			ht.call(URL, envelope);
			obj = envelope.getResponse();
		} catch (Exception e) {
		}
		return obj;
	}
}
